//
//  GRStoreCommentModel.m
//  YC_GRice
//
//  Created by luojinrong11 on 2018/8/29.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import "GRStoreCommentModel.h"

@implementation GRStoreCommentModel

-(CGFloat)cellHeight{
    CGFloat height = 54;
    if (self.photosArray.count >0) {
       NSInteger yu = self.photosArray.count%3;
      NSInteger count = yu >=1 ?(self.photosArray.count/3)+1:self.photosArray.count/3;
        height += count *((KscreenWidth-90)/3)+(count -1)*8 +20;
        
    }
    
    if (self.content) {
        height += [self.content boundingRectWithSize:CGSizeMake(KscreenWidth-80, MAXFLOAT) options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size.height+15;
    }
    if (self.replyContent) {
        height +=[self.replyContent boundingRectWithSize:CGSizeMake(KscreenWidth-80, MAXFLOAT) options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} context:nil].size.height+20;
    }
    return height;
}
@end
